body {
    font-family: "Nunito Sans",Helvetica,sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    overflow:hidden;
    margin:0;
}

.row {
    max-width:400px;
    margin: 0 auto;
}

#top-container {
    padding: 30px 40px 30px 40px;
}

.bottom-container {
    text-align: right;
    padding: 0;
    margin: 0;
}

input[type=text],input[type=password],input[type=email] {
    border-style: solid;
    border-width: 1px;
    border-color: #ccc;
    color: rgba(0,0,0,0.75);
    display: block;
    height: 2.3125rem;
    width: 100%;
    transition: border-color .15s linear,background .15s linear;
    box-shadow: 0 0 6px rgba(0,0,0,0.11);
    border-radius: 4px;
    background: white;
    margin: 3px 0 1rem;
    outline:0;
    padding: 8px;
    box-sizing: border-box;
}

input:hover, input:focus {
    border-color:#1a1a1a;
}

label {
    color: #4d4d4d;
    cursor: pointer;
    display: block;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.5;
}

button {
    display: block;
    margin: 20px auto 20px auto;
    max-width: 300px;
    width: 100%;
    border-radius: 25px;
    height: 50px;
    line-height: 50px;
    font-family: "Nunito Sans", Helvetica, sans-serif;
    box-shadow: 0 0 15px rgb(0 0 0 / 10%);
    border:0;
    cursor:pointer;
    color:white;
    font-size:16px;
}

#login, #submit-email {
    margin-bottom:0;
    background: #0b6fae;
}

.submit-social {
    display: grid;
    grid-template-columns: 24px 1fr 24px;
    align-items: center;
    column-gap: 8px;
    line-height: normal;
    padding: 0 11px;
    margin-top: 0;
    text-shadow: 0 0 1px #cecece;
    text-align: center;
    position: relative;
}

.submit-social img {
    width: 24px;
    height: 24px;
    position: static;
    transform: none;
}

.submit-social .social-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    text-align: center;
}

.submit-social::after {
    content: "";
    width: 24px;
    height: 24px;
}

#submit-facebook {
    background: #3b5998;
}

#submit-google {
    background:white;
    color: #4b5563;
}

#soc-container {
    padding: 46px;
    margin: 0;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
    text-align: center;
}

#email-auth-page #soc-container {
    background: none;
}

#load-overlay {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #fcfcfc;
    opacity:0;
    z-index: 4;
    position: absolute;
    padding-top: 15%;
    text-align: center;
    display: none;
    font-size:15px;
    transition:1.5s;
}

#load-overlay.visible {
    display: block;
    opacity: 0.85;
}


small.error {
    display:none;
    color: #cc2020;
}

img {
    vertical-align:middle;
}

a {
    text-decoration: none;

    color: #32a4e6;
}

#forgot-password-link {
    font-size: 0.8em;
    padding-top: 0.1em;
    float:right;
    color: #006b8f;
}

.login-error {
    background-color: #FFFFD6;
    padding: 10px 5px 10px 5px;
    margin-bottom: 10px;
    color: #404040;
    font-size: 11pt;
    text-align: center;
    display: none;
}

#email-required {
    width: 100%;color: red;padding: 10px;display:none;
}

#signup-terms {
    background:#fbfbfb;
    padding:15px;
}

/* hCaptcha fallback container styles */
.hcaptcha-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto;
    min-height: 78px;
    text-align: center;
}

/* Center the hCaptcha iframe inside the container */
.hcaptcha-container > div,
.hcaptcha-container > iframe {
    margin: 0 auto !important;
}

#login-page .hcaptcha-container {
    zoom: 0.85;
    transform-origin: center;
}

#signup-page .hcaptcha-container {
    margin: 10px auto;
    zoom: 0.85;
}

#email-auth-page .hcaptcha-container {
    margin: 10px 0;
}

.signup-errors {
    margin: 20px 0 -27px 0;
    text-align: center;
}
label.error {
    color: #cc2020;
}

@media all and (max-height: 500px) {
    #login-page {
        zoom:0.87;
    }

    #signup-page {
        zoom:0.78;
    }

    #signup-page .hcaptcha-container {
        zoom: 1.3;
        transform: scale(0.7);
        left:0;
        top:0;
    }
}

@media all and (max-width: 410px), all and (max-height: 600px) {
    #signup-page label {
        font-size: 0.8rem;
    }
    #signup-page #top-container {
        padding: 32px 32px 10px 32px;
    }

    #signup-terms {
        background:none;
        padding:0;
    }
    #signup-terms label {
        margin-bottom:5px;
    }

    #signup-page #soc-container {
        margin: 16px 0;
        padding: 30px;
    }

    #email-auth-page #soc-container {
        margin: 16px 0;
        padding: 30px;
    }
}

@media all and (max-width:340px) {
    body {
        zoom:0.9
    }

    #signup-page .hcaptcha-container {
        zoom: 1.1;
        transform: scale(0.9);
        top:0;
    }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Better touch targets for mobile */
input[type=text],
input[type=password],
input[type=email] {
    min-height: 44px;
    font-size: 16px; /* Prevents iOS zoom on focus */
}

button {
    min-height: 50px;
    touch-action: manipulation;
}

/* Mobile layout improvements */
@media all and (max-width: 480px) {
    body {
        overflow: auto; /* Allow scrolling on mobile */
    }

    .row {
        max-width: 100%;
        padding: 0 1rem;
    }

    #top-container {
        padding: 1.5rem 1.25rem;
    }

    #soc-container {
        padding: 1.5rem 1.25rem;
    }

    label {
        font-size: 0.9rem;
    }

    .login-error {
        padding: 0.75rem;
        font-size: 0.875rem;
        word-break: break-word;
    }

    #forgot-password-link {
        font-size: 0.85rem;
    }

    /* hCaptcha container responsive */
    .hcaptcha-container {
        min-height: 0;
    }

    #login-page .hcaptcha-container,
    #signup-page .hcaptcha-container,
    #email-auth-page .hcaptcha-container {
        zoom: 1;
        transform: none;
        transform-origin: center;
    }

    #signup-terms label {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    /* Error messages */
    small.error,
    label.error {
        font-size: 0.8rem;
        word-break: break-word;
    }
}

/* Extra small screens */
@media all and (max-width: 360px) {
    #top-container {
        padding: 1rem;
    }

    #soc-container {
        padding: 1rem;
    }

    button {
        font-size: 0.9rem;
    }

    label {
        font-size: 0.8rem;
    }

    input[type=text],
    input[type=password],
    input[type=email] {
        font-size: 16px; /* Keep 16px to prevent iOS zoom on focus */
        padding: 0.5rem;
    }
}

/* Toast notifications */
.login-toast {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 20px;
    text-align: center;
    font-size: 0.9rem;
    font-family: "Nunito Sans", Helvetica, sans-serif;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.login-toast.visible {
    transform: translateY(0);
}
.login-toast-warning {
    background-color: #fff3cd;
    color: #856404;
}
.login-toast-error {
    background-color: #f8d7da;
    color: #721c24;
}
.login-toast-success {
    background-color: #d4edda;
    color: #155724;
}

/* Landscape phone orientation */
@media all and (max-height: 450px) and (orientation: landscape) {
    body {
        overflow: auto;
    }

    #top-container {
        padding: 1rem;
    }

    #soc-container {
        padding: 1rem;
    }

    .hcaptcha-container {
        zoom: 0.85;
        transform: scale(0.85);
    }
}
